Export a workflow

Exports the specified workflow.

Note: This API supports forms designed using the Classic Forms and Responsive Forms designers. Forms designed using the New Responsive Forms designer are not supported.

Request

Method Request URI HTTP Version
GET https://{baseURL}/api/v1/workflows/packages/{id} HTTP/1.1

Request Parameters

Request Parameter Description

baseURL

Required. The base URL for the Nintex Workflow for Office 365 REST API. For more information about the base URL, see Base URL.

id

Required. The identifier of the workflow to be exported.

Request Headers

This operation uses both common and specific request headers. For more information about common request headers used by all operations, see Common headers. The following table describes specific request headers used by this operation.

Request Header Description

Content-Type

Required. application/nwp

Request Body

This operation does not use a request body.

Response

This operation returns an HTTP status code, response headers, and a response body.

Response Codes

This operation returns only common HTTP status codes. For more information about common HTTP status codes returned by all operations, see Common status and error codes.

Response Headers

This operation returns both common and specific response headers. For more information about common response headers returned by all operations, see Common headers. The following table describes specific response headers returned by this operation.

Response Header Description

Cache-Control

private

Content-Disposition

Suggested file name of the export file, in the following format, replacing <WorkflowName> with the name of the workflow:
attachment; filename=<WorkflowName>.nwp

Content-Type

application/nwp

Response Body

If this operation was successful, the response body contains a Base64-encoded binary value that represents the contents of a Nintex Workflow for Office 365 export (.nwp) file. Otherwise, the response body contains an Error object, which provides information about the error response. For more information about the Error object, see Response bodies.

Remarks

The response body for a successful operation contains a binary value that represents the contents of a Nintex Workflow for Office 365 export (.nwp) file. The response body can be either saved as a file, or provided as the request body for other operations in the REST API.

If the workflow contains workflow actions that use custom Nintex task forms, the form definitions are ignored by the operation if Nintex Forms integration is not supported; otherwise, the operation exports the form definitions.

To support Nintex Forms integration, Nintex Forms for Office 365 version 1.2.1.0 or greater must be installed.

Example

The following example demonstrates how to export a workflow from a SharePoint site.

Request

The following GET request exports the specified workflow from a SharePoint site.

https://crestan.nintexo365.com/api/v1/workflows/packages/fd4f1cd2-7ea7-4b62-9751-0ff83ab609f7

Response

An HTTP 200 response code is returned, indicating that the specified workflow was successfully exported from the SharePoint site. The Content-Disposition header value provides a suggested file name for the export file, if one is created to contain the binary value included in the response body.

Response Body

The response body contains a Base64-encoded binary value, representing the compressed contents of a export file. The response body can be saved, without further manipulation, as an export file, or the binary value can be used in other service operations.

Related Information

Exporting workflows

API Reference